home *** CD-ROM | disk | FTP | other *** search
open in:
MacOS 8.1
|
Win98
|
DOS
browse contents |
view JSON data
|
view as text
This file was processed as: Mailbox/MIME Entity
(archive/mbox).
Confidence | Program | Detection | Match Type | Support
|
---|
100%
| dexvert
| Mailbox/MIME Entity (archive/mbox)
| magic
| Supported |
1%
| dexvert
| Text File (text/txt)
| fallback
| Supported |
100%
| file
| ASCII text
| default
| |
100%
| checkBytes
| Printable ASCII
| default
| |
100%
| perlTextCheck
| Likely Text (Perl)
| default
| |
100%
| siegfried
| fmt/950 MIME Email (1.0)
| default
| |
100%
| detectItEasy
| Format: plain text[LF]
| default (weak)
|
|
hex view+--------+-------------------------+-------------------------+--------+--------+
|00000000| 4e 65 77 73 67 72 6f 75 | 70 73 3a 20 63 6f 6d 70 |Newsgrou|ps: comp|
|00000010| 2e 6c 61 6e 67 2e 63 0a | 50 61 74 68 3a 20 64 69 |.lang.c.|Path: di|
|00000020| 73 63 75 73 2e 74 65 63 | 68 6e 69 6f 6e 2e 61 63 |scus.tec|hnion.ac|
|00000030| 2e 69 6c 21 63 73 64 21 | 65 6d 69 6c 64 0a 46 72 |.il!csd!|emild.Fr|
|00000040| 6f 6d 3a 20 4b 6f 68 6e | 20 45 6d 69 6c 20 44 61 |om: Kohn| Emil Da|
|00000050| 6e 20 3c 65 6d 69 6c 64 | 40 63 73 2e 74 65 63 68 |n <emild|@cs.tech|
|00000060| 6e 69 6f 6e 2e 61 63 2e | 69 6c 3e 0a 53 75 62 6a |nion.ac.|il>.Subj|
|00000070| 65 63 74 3a 20 52 65 3a | 20 73 73 63 61 6e 66 20 |ect: Re:| sscanf |
|00000080| 62 75 67 3f 3f 3f 3f 3f | 3f 20 0a 43 6f 6e 74 65 |bug?????|? .Conte|
|00000090| 6e 74 2d 54 79 70 65 3a | 20 54 45 58 54 2f 50 4c |nt-Type:| TEXT/PL|
|000000a0| 41 49 4e 3b 20 63 68 61 | 72 73 65 74 3d 55 53 2d |AIN; cha|rset=US-|
|000000b0| 41 53 43 49 49 0a 4f 72 | 67 61 6e 69 7a 61 74 69 |ASCII.Or|ganizati|
|000000c0| 6f 6e 3a 20 54 65 63 68 | 6e 69 6f 6e 2c 20 49 73 |on: Tech|nion, Is|
|000000d0| 72 61 65 6c 20 49 6e 73 | 74 69 74 75 74 65 20 6f |rael Ins|titute o|
|000000e0| 66 20 54 65 63 68 6e 6f | 6c 6f 67 79 0a 44 61 74 |f Techno|logy.Dat|
|000000f0| 65 3a 20 46 72 69 2c 20 | 31 36 20 46 65 62 20 31 |e: Fri, |16 Feb 1|
|00000100| 39 39 36 20 31 30 3a 35 | 34 3a 32 39 20 47 4d 54 |996 10:5|4:29 GMT|
|00000110| 0a 4d 65 73 73 61 67 65 | 2d 49 44 3a 20 3c 50 69 |.Message|-ID: <Pi|
|00000120| 6e 65 2e 53 56 34 2e 33 | 2e 39 31 2d 68 65 62 2d |ne.SV4.3|.91-heb-|
|00000130| 32 2e 30 34 2e 39 36 30 | 32 31 36 31 32 32 39 30 |2.04.960|21612290|
|00000140| 34 2e 32 39 35 39 36 41 | 2d 31 30 30 30 30 30 40 |4.29596A|-100000@|
|00000150| 63 73 2e 74 65 63 68 6e | 69 6f 6e 2e 61 63 2e 69 |cs.techn|ion.ac.i|
|00000160| 6c 3e 0a 4d 69 6d 65 2d | 56 65 72 73 69 6f 6e 3a |l>.Mime-|Version:|
|00000170| 20 31 2e 30 0a 49 6e 2d | 52 65 70 6c 79 2d 54 6f | 1.0.In-|Reply-To|
|00000180| 3a 20 3c 34 66 69 6d 76 | 6f 24 38 32 73 40 66 6e |: <4fimv|o$82s@fn|
|00000190| 6f 72 64 2e 64 66 77 2e | 6e 65 74 3e 20 0a 58 2d |ord.dfw.|net> .X-|
|000001a0| 4e 6e 74 70 2d 50 6f 73 | 74 69 6e 67 2d 48 6f 73 |Nntp-Pos|ting-Hos|
|000001b0| 74 3a 20 63 73 64 2e 63 | 73 2e 74 65 63 68 6e 69 |t: csd.c|s.techni|
|000001c0| 6f 6e 2e 61 63 2e 69 6c | 0a 53 65 6e 64 65 72 3a |on.ac.il|.Sender:|
|000001d0| 20 6e 65 77 73 40 64 69 | 73 63 75 73 2e 74 65 63 | news@di|scus.tec|
|000001e0| 68 6e 69 6f 6e 2e 61 63 | 2e 69 6c 20 28 4e 65 77 |hnion.ac|.il (New|
|000001f0| 73 20 73 79 73 74 65 6d | 29 0a 58 2d 53 65 6e 64 |s system|).X-Send|
|00000200| 65 72 3a 20 65 6d 69 6c | 64 40 63 73 64 0a 0a 0a |er: emil|d@csd...|
|00000210| 0a 4f 6e 20 31 30 20 46 | 65 62 20 31 39 39 36 2c |.On 10 F|eb 1996,|
|00000220| 20 4a 65 72 72 79 20 4a | 61 63 6b 73 6f 6e 20 77 | Jerry J|ackson w|
|00000230| 72 6f 74 65 3a 0a 0a 3e | 20 74 68 65 20 66 6f 6c |rote:..>| the fol|
|00000240| 6c 6f 77 69 6e 67 20 69 | 73 20 61 20 70 72 6f 67 |lowing i|s a prog|
|00000250| 72 61 6d 20 63 6f 6d 70 | 69 6c 65 64 20 75 73 69 |ram comp|iled usi|
|00000260| 6e 67 20 6d 69 63 72 6f | 77 61 79 20 6e 64 70 20 |ng micro|way ndp |
|00000270| 63 2f 63 2b 2b 20 63 6f | 6d 70 69 6c 65 72 2e 0a |c/c++ co|mpiler..|
|00000280| 3e 20 0a 3e 20 23 69 6e | 63 6c 75 64 65 20 3c 73 |> .> #in|clude <s|
|00000290| 74 64 69 6f 2e 68 3e 0a | 3e 20 23 69 6e 63 6c 75 |tdio.h>.|> #inclu|
|000002a0| 64 65 20 3c 73 74 72 69 | 6e 67 2e 68 3e 0a 3e 20 |de <stri|ng.h>.> |
|000002b0| 0a 3e 20 6d 61 69 6e 28 | 29 0a 3e 20 7b 0a 3e 20 |.> main(|).> {.> |
|000002c0| 09 63 68 61 72 20 73 74 | 72 5f 31 5b 5d 20 3d 20 |.char st|r_1[] = |
|000002d0| 22 30 31 33 31 39 36 22 | 3b 0a 3e 20 09 63 68 61 |"013196"|;.> .cha|
|000002e0| 72 20 73 74 72 5f 32 5b | 5d 20 3d 20 22 31 33 31 |r str_2[|] = "131|
|000002f0| 39 36 22 3b 0a 3e 20 09 | 6c 6f 6e 67 20 72 65 73 |96";.> .|long res|
|00000300| 5f 31 2c 20 72 65 73 5f | 32 3b 0a 3e 20 0a 3e 20 |_1, res_|2;.> .> |
|00000310| 09 73 73 63 61 6e 66 28 | 73 74 72 5f 31 2c 22 25 |.sscanf(|str_1,"%|
|00000320| 64 22 2c 26 72 65 73 5f | 31 29 3b 0a 3e 20 09 73 |d",&res_|1);.> .s|
|00000330| 73 63 61 6e 66 28 73 74 | 72 5f 32 2c 22 25 64 22 |scanf(st|r_2,"%d"|
|00000340| 2c 26 72 65 73 5f 32 29 | 3b 0a 3e 20 0a 3e 20 09 |,&res_2)|;.> .> .|
|00000350| 70 72 69 6e 74 66 28 22 | 5c 6e 72 65 73 5f 31 20 |printf("|\nres_1 |
|00000360| 3d 20 25 64 22 2c 72 65 | 73 5f 31 29 3b 0a 3e 20 |= %d",re|s_1);.> |
|00000370| 09 70 72 69 6e 74 66 28 | 22 5c 6e 72 65 73 5f 32 |.printf(|"\nres_2|
|00000380| 20 3d 20 25 64 22 2c 72 | 65 73 5f 32 29 3b 0a 3e | = %d",r|es_2);.>|
|00000390| 20 7d 0a 3e 20 0a 3e 20 | 74 68 65 20 6f 75 74 70 | }.> .> |the outp|
|000003a0| 75 74 20 6c 6f 6f 6b 73 | 20 6c 69 6b 65 20 74 68 |ut looks| like th|
|000003b0| 69 73 3a 0a 3e 20 0a 3e | 20 72 65 73 5f 31 20 3d |is:.> .>| res_1 =|
|000003c0| 20 38 39 0a 3e 20 72 65 | 73 5f 32 20 3d 20 31 33 | 89.> re|s_2 = 13|
|000003d0| 31 39 36 0a 3e 20 0a 3e | 20 0a 3e 20 6d 69 63 72 |196.> .>| .> micr|
|000003e0| 6f 77 61 79 20 73 61 79 | 73 20 74 68 61 74 20 74 |oway say|s that t|
|000003f0| 68 65 20 6c 65 61 64 69 | 6e 67 20 7a 65 72 6f 20 |he leadi|ng zero |
|00000400| 63 61 75 73 65 73 20 73 | 73 63 61 6e 66 20 74 6f |causes s|scanf to|
|00000410| 20 64 6f 20 61 6e 20 6f | 63 74 61 6c 20 0a 3e 20 | do an o|ctal .> |
|00000420| 63 6f 6e 76 65 72 73 69 | 6f 6e 20 6f 6e 20 74 68 |conversi|on on th|
|00000430| 65 20 69 6e 74 65 67 65 | 72 2e 20 20 69 20 68 61 |e intege|r. i ha|
|00000440| 76 65 20 6e 6f 74 20 66 | 6f 75 6e 64 20 61 6e 79 |ve not f|ound any|
|00000450| 20 64 6f 63 75 6d 65 6e | 74 61 74 69 6f 6e 20 74 | documen|tation t|
|00000460| 6f 20 76 65 72 69 66 79 | 20 0a 3e 20 74 68 69 73 |o verify| .> this|
|00000470| 2e 20 20 61 6c 73 6f 20 | 6f 74 68 65 72 20 63 6f |. also |other co|
|00000480| 6d 70 69 6c 65 72 73 20 | 74 68 61 74 20 69 20 75 |mpilers |that i u|
|00000490| 73 65 20 72 65 74 75 72 | 6e 20 74 68 65 20 76 61 |se retur|n the va|
|000004a0| 6c 75 65 20 31 33 31 39 | 36 20 66 6f 72 20 62 6f |lue 1319|6 for bo|
|000004b0| 74 68 20 0a 3e 20 63 61 | 6c 6c 73 20 74 6f 20 73 |th .> ca|lls to s|
|000004c0| 73 63 61 6e 66 2e 0a 3e | 20 0a 3e 20 62 75 67 20 |scanf..>| .> bug |
|000004d0| 6f 72 20 75 6e 64 6f 63 | 75 6d 65 6e 74 65 64 20 |or undoc|umented |
|000004e0| 66 65 61 74 75 72 65 3f | 0a 3e 20 0a 0a 0a 57 65 |feature?|.> ...We|
|000004f0| 69 72 64 2e 20 4e 6f 72 | 6d 61 6c 6c 79 2c 20 27 |ird. Nor|mally, '|
|00000500| 30 27 20 73 74 61 72 74 | 69 6e 67 20 6e 75 6d 65 |0' start|ing nume|
|00000510| 72 69 63 61 6c 20 73 74 | 72 69 6e 67 20 69 73 20 |rical st|ring is |
|00000520| 69 6e 74 65 72 70 65 74 | 65 64 20 61 73 20 61 6e |interpet|ed as an|
|00000530| 20 6f 63 74 61 6c 0a 6e | 75 6d 62 65 72 20 6f 6e | octal.n|umber on|
|00000540| 6c 79 20 69 66 20 79 6f | 75 20 75 73 65 20 74 68 |ly if yo|u use th|
|00000550| 65 20 25 69 20 64 65 73 | 63 72 69 70 74 6f 72 20 |e %i des|criptor |
|00000560| 66 6f 72 20 72 65 61 64 | 69 6e 67 2e 20 49 66 20 |for read|ing. If |
|00000570| 79 6f 75 20 75 73 65 20 | 74 68 65 20 25 64 0a 64 |you use |the %d.d|
|00000580| 65 73 72 69 70 74 6f 72 | 2c 20 74 68 65 20 69 6e |esriptor|, the in|
|00000590| 70 75 74 20 73 68 6f 75 | 6c 64 20 62 65 20 63 6f |put shou|ld be co|
|000005a0| 6e 73 69 64 65 72 65 64 | 20 61 20 64 65 63 69 6d |nsidered| a decim|
|000005b0| 61 6c 20 6e 75 6d 62 65 | 72 2e 20 53 6f 20 6e 6f |al numbe|r. So no|
|000005c0| 72 6d 61 6c 6c 79 0a 79 | 6f 75 20 73 68 6f 75 6c |rmally.y|ou shoul|
|000005d0| 64 20 68 61 76 65 20 74 | 68 65 20 73 61 6d 65 20 |d have t|he same |
|000005e0| 72 65 73 75 6c 74 73 20 | 69 6e 20 62 6f 74 68 20 |results |in both |
|000005f0| 63 61 73 65 73 2e 20 54 | 68 65 72 65 20 69 73 20 |cases. T|here is |
|00000600| 61 20 70 72 6f 62 6c 65 | 6d 20 77 69 74 68 0a 79 |a proble|m with.y|
|00000610| 6f 75 72 20 63 6f 64 65 | 2c 20 6e 61 6d 65 6c 79 |our code|, namely|
|00000620| 20 79 6f 75 20 75 73 65 | 20 25 64 20 66 6f 72 20 | you use| %d for |
|00000630| 72 65 61 64 69 6e 67 20 | 61 20 6c 6f 6e 67 2c 20 |reading |a long, |
|00000640| 61 6e 64 20 74 68 69 73 | 20 69 73 20 75 6e 64 65 |and this| is unde|
|00000650| 66 69 6e 65 64 0a 62 65 | 68 61 76 69 6f 72 2e 20 |fined.be|havior. |
|00000660| 53 6f 20 74 72 79 20 74 | 6f 20 72 65 70 6c 61 63 |So try t|o replac|
|00000670| 65 20 74 68 65 20 25 64 | 20 77 69 74 68 20 25 6c |e the %d| with %l|
|00000680| 69 2c 20 69 6e 20 73 73 | 63 61 6e 66 28 29 20 61 |i, in ss|canf() a|
|00000690| 6e 64 20 74 68 65 20 25 | 64 20 77 69 74 68 0a 25 |nd the %|d with.%|
|000006a0| 6c 64 20 70 72 69 6e 74 | 66 20 61 6e 64 20 73 65 |ld print|f and se|
|000006b0| 65 20 77 68 61 74 20 68 | 61 70 70 65 6e 73 20 74 |e what h|appens t|
|000006c0| 68 65 6e 2e 20 0a 0a 41 | 6e 79 77 61 79 2c 20 69 |hen. ..A|nyway, i|
|000006d0| 74 20 6c 6f 6f 6b 73 20 | 6c 69 6b 65 20 79 6f 75 |t looks |like you|
|000006e0| 72 20 63 6f 6d 70 69 6c | 65 72 20 70 65 72 66 6f |r compil|er perfo|
|000006f0| 72 6d 65 64 20 74 68 65 | 20 6f 63 74 61 6c 20 63 |rmed the| octal c|
|00000700| 6f 6e 76 65 72 73 69 6f | 6e 20 0a 63 6f 72 72 65 |onversio|n .corre|
|00000710| 63 74 6c 79 2c 20 61 73 | 20 30 31 33 31 39 36 20 |ctly, as| 013196 |
|00000720| 77 69 6c 6c 20 62 65 20 | 72 65 61 64 20 61 73 20 |will be |read as |
|00000730| 30 31 33 31 20 28 61 73 | 20 39 20 69 73 20 61 6e |0131 (as| 9 is an|
|00000740| 20 69 6e 76 61 6c 69 64 | 20 6f 63 74 61 6c 20 0a | invalid| octal .|
|00000750| 64 69 67 69 74 29 2c 20 | 61 6e 64 20 30 31 33 31 |digit), |and 0131|
|00000760| 20 69 6e 20 6f 63 74 61 | 6c 20 69 73 20 38 39 20 | in octa|l is 89 |
|00000770| 69 6e 20 64 65 63 69 6d | 61 6c 2e 20 0a 0a 0a 48 |in decim|al. ...H|
|00000780| 6f 70 65 20 74 68 69 73 | 20 68 65 6c 70 73 2e 0a |ope this| helps..|
|00000790| 0a 09 09 09 09 09 09 09 | 52 65 67 61 72 64 73 2c |........|Regards,|
|000007a0| 0a 0a 09 09 09 09 09 09 | 09 09 45 6d 69 6c 0a 0a |........|..Emil..|
+--------+-------------------------+-------------------------+--------+--------+